#ifndef __YIN_H
#define __YIN_H

#include "stm32f1xx_hal.h"
#include <string.h>

extern UART_HandleTypeDef huart1;

typedef struct {
    uint8_t data[200];
    uint16_t length;
    uint16_t index;
    uint8_t is_playing;
} YIN_Playback_t;

extern YIN_Playback_t yin_playback;

// 简化函数名
void YIN_Speech(const uint8_t *gb_data);
uint8_t YIN_IsPlaying(void);

#endif

